/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package test.coalescent.data;

import coalescent.data.KC64Data;
import coalescent.model.KC64;

import java.util.HashMap;
import java.util.Map;

/**
 * Contains test data for KC64Data.ofCannonicalForm. Some of these data should belong to the model data, e.g.,
 * the probabilities. But since we have not defined a data class for {@code KC64} model we
 * will define here both the model data and the config specific data (e.g., ancestral
 * and genealogy counts).
 *
 * @author Susanta Tewari
 * @since Oct 17, 2011
 */
public class KC64TestData {


    // <editor-fold defaultstate="collapsed" desc="Hein Data Set">

    /**
     * (page 47, Hein`s book)
     * (page 48, Table 2.1, Hein`s book)
     */
    public static final Map<String, KC64Data.DEFAULT> heinDataSet = new HashMap<>();


    // <editor-fold defaultstate="collapsed" desc="Exact Probs: Hein Data Set">

    /** Field description */
    public static final Map<String, Double> heinExactProbs = new HashMap<>();


    // <editor-fold defaultstate="collapsed" desc="KC64Data.ofCannonicalFormcestral Config Counts: Hein Data Set">

    /** Field description */
    public static final Map<String, Long> heinGeneTreeConfigCounts = new HashMap<>();


    // <editor-fold defaultstate="collapsed" desc="Genealogy Counts: Hein Data Set">

    /** Field description */
    public static final Map<String, Long> heinGeneTreeGenealogyCounts = new HashMap<>();

    static {


        // D-1
        heinDataSet.put("D-1", KC64Data.ofCannonicalForm(new KC64(1.0), "1^1_2^1"));


        // D-2
        heinDataSet.put("D-2", KC64Data.ofCannonicalForm(new KC64(1.0), "8^1"));


        // D-3
        heinDataSet.put("D-3", KC64Data.ofCannonicalForm(new KC64(1.0), "1^1_2^1_5^1"));


        // D-4
        heinDataSet.put("D-4", KC64Data.ofCannonicalForm(new KC64(1.0), "1^3_5^1"));


        // D-5
        heinDataSet.put("D-5", KC64Data.ofCannonicalForm(new KC64(1.0), "1^3_2^1"));
    }    // </editor-fold>

    static {


        // put the hein exact probabilities
        heinExactProbs.put("D-1", 0.5);
        heinExactProbs.put("D-2", 0.125);
        heinExactProbs.put("D-3", 0.1);
        heinExactProbs.put("D-4", 1.0E-1 / 3);
        heinExactProbs.put("D-5", 8.3333E-2);
    }    // </editor-fold>

    static {


        // put the hein genealogy counts
        heinGeneTreeConfigCounts.put("D-5", 8l);
    }    // </editor-fold>

    static {


        // put the hein genealogy counts
        heinGeneTreeGenealogyCounts.put("D-5", 4l);
    }    // </editor-fold>

    /**
     * Constructs ...
     *
     */
    private KC64TestData() {}
}
